package com.wen.dao;

import com.wen.pojo.Permission;
import com.wen.pojo.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    List<Role> findAll()throws Exception;

    int add(Role role)throws Exception;

    Role findById(int id)throws Exception;

    int deleteById(int id)throws Exception;

    int updateById(Role role)throws Exception;

    List<Permission> findOtherPermissions(int roleId);

    void addPermissionToRole(@Param("roleId") int roleId,@Param("permissionId") int permissionId);
}
